package com.ostrich.cloud.ostrichManagerWeb.app.controller;

import com.ostrich.cloud.common.result.Result;
import com.ostrich.cloud.ostrichManagerWeb.client.BusinessManagerClient;
import com.ostrich.cloud.ostrichUserService.client.BusinessmanMangerClient;
import com.ostrich.ostrichUserService.param.bussiness.RegBussinessmanParam;
import com.ostrich.ostrichUserService.param.bussiness.UpdateBusParam;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import javax.validation.Valid;
@RestController
public class BusinessManagerApiImp implements BusinessManagerClient {

    @Resource
    private BusinessmanMangerClient businessmanMangerClient;

    @Override
    public Result addBusiness(@Valid RegBussinessmanParam param) {
        Result result = businessmanMangerClient.addBusiness(param);
        return result;
    }

    @Override
    public Result updateBusinessMessage(@Valid UpdateBusParam updateBusParam) {
        Result result = businessmanMangerClient.updateBusinessMessage(updateBusParam);
        return result;
    }

    @Override
    public Result getAllBusiness(Integer current, Integer size, String status) {

        Result allBusiness = businessmanMangerClient.getAllBusiness(current, size, status);
        return allBusiness;


    }
}
